<template>
	<view>
		<view class="card">
			<view class="content">
				<image :src="goodsdata.url">
				</image>
				<view class="name"><span>{{goodsdata.name}}</span></view>
			</view>
			<view class="footer">
				<span>¥{{goodsdata.price}}</span>
				<button type="default" class="exchange_btn" @click="exchange">兑换</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			goodsdata: {
				// 列表标题
				type: Object
			},
		},
		data() {
			return {

			};
		},
		methods: {
			exchange() {
				this.$emit('exchange', this.data)
			}
		}
	}
</script>

<<<<<<< HEAD
<style lang="scss" scoped>
=======
<style lang="scss">
>>>>>>> faa11e759426cb1e677c9f3ffa7d00afe5de77cf
	.card {
		width: 270rpx;
		height: 340rpx;
		background: #FFFFFF;
<<<<<<< HEAD
=======
		background: #FFFFFF;
>>>>>>> faa11e759426cb1e677c9f3ffa7d00afe5de77cf
		box-shadow: 0rpx 6rpx 11rpx 1rpx #CACACA;
		border-radius: 20rpx;
		margin: 10rpx;
		display: flex;
		flex-direction: column;

		.content {
			position: relative;

			.name {
				position: absolute;
				width: 100%;
				height: 46rpx;
<<<<<<< HEAD
				bottom: 0;
=======
				bottom: 10rpx;
>>>>>>> faa11e759426cb1e677c9f3ffa7d00afe5de77cf
				background-color: rgba(255, 255, 255, 0.6);
				display: flex;
				align-items: center;

				span {
					color: #191919;
					font-size: 22rpx;
					font-weight: bold;
					padding-left: 16rpx;
				}

			}

			image {
				width: 100%;
				height: 270rpx;
				border-radius: 20rpx 20rpx 0 0;
			}
		}


		.footer {
			display: flex;
			justify-content: space-around;
			align-items: center;
<<<<<<< HEAD
			height: 100rpx;
=======
			height: 70rpx;
>>>>>>> faa11e759426cb1e677c9f3ffa7d00afe5de77cf

			span {
				font-size: 20rpx;
				font-weight: bold;
				color: #3B3B3B;
			}

			.exchange_btn {
				background: #07CFD2;
<<<<<<< HEAD
				color: #FFFFFF;
=======
				color: #FFFFFF;		
>>>>>>> faa11e759426cb1e677c9f3ffa7d00afe5de77cf
				font-size: 24rpx;
				border-radius: 19rpx;
				height: 38rpx;
				margin: 0;
				display: flex;
				justify-content: center;
				align-items: center;

			}
		}
	}
</style>
